const { name } = require('../package.json')
console.log(name,'name=========')
module.exports = {
  // publicPath: '/subapp/sub-vue',
  transpileDependencies: ['common'],
  chainWebpack: config => {
    config.resolve.symlinks(false)
    // config.output.filename('[name].js').end()
  },
  configureWebpack: {
    mode: 'development',
    output: {
      // 把子应用打包成 umd 库格式
      library: `${name}-[name]`,
      libraryTarget: 'umd',
      jsonpFunction: `webpackJsonp_${name}`,
      // jsonpFunction: `webpackJsonp_${name}`
    }
  },
  devServer: {
    port: process.env.VUE_APP_PORT,
    headers: {
      'Access-Control-Allow-Origin': '*'
    }
  }
}
